import request from '@/router/axios'

//新增客户资料
export function addCustomerInfo(obj) { 
    return request({
        url: '/cp/contactfield',   
        method: 'post',
        data: obj
    })
}

//新增获取字段类型
export function contactfieldTypeList() {
    return request({
        url: '/cp/contactfield/type',   
        method: 'get'
    })
}

//获取客户资料列表
export function getCustomerList(query) { 
    return request({
        url: '/cp/contactfield/page',
        method: 'get',
        params: query
    })
}

//切换客户资料的状态
export function changeCusStatus(query) { 
    return request({
        url: '/cp/contactfield/statusupdate',
        method: 'put',
        params:query
    })
}

//修改客户资料接口
export function updateCustomerInfo(obj) { 
    return request({
        url: '/cp/contactfield',
        method: 'put',
        data:obj
    })
}

//批量修改客户资料接口
export function updateCustomerAll(obj) { 
    return request({
        url: '/cp/contactfield/batchupdate',
        method: 'put',
        data:obj
    })
}

// 删除客户资料接口
export function deleteCustomer(id) { 
    return request({
        url: '/cp/contactfield/'+id,
        method: 'delete'
    })
}